#include <cstdio>
#include <cstdlib>

struct LNode
{
	int data;
	LNode * next;
};

void insert_head(int val,LNode**head)
{
	LNode *temp;
	temp->data = val;
	temp->next = *head;

	*head = temp;
}
bool delete_(int val,LNode**head)
{
	LNode*temp;
	if ((*head)->data == val)
	{
		temp = *head;
		*head = (*head)->next;
		free(temp);
		return 1;
	}
	else 
	{
		LNode *pre = *head;
		while (pre->next != NULL)
		{	
			if (pre->next->data == val)
			{
				temp = pre->next;
				pre->next = pre->next->next;
				free(temp);
				return 1;
			}
			else 
			{
				pre = pre->next;
			}
		}
	}
	return 0;
}

void test()
{
	LNode *head;
	
}

int main()
{
	test();
	return 0;
}